package ex_from_web;



class Book {
	   /** variable title */
	   String title;
	    
	   /** special method called CONSTRUCTOR
	    *  called when object was created */
	   Book(String title) {
	    this.title = title;
	   }
	   /** this method changes title to upper case */
	   void changeToUpperCase() {
	    title = title.toUpperCase();
	   }
	   /** this method returns title */
	   String getTitle() {
	    return title;
	   }
	}

public class java_class {
	    /**
	    * Java Class example
	    * demonstrates basic use of the 
	    * Java Classes and Java Objects
	    */
	   public static void main(String[] args) {
	    Book book1 = new Book("Java Examples");
	    Book book2 = new Book("Java Tutorial");
	    //change book1 title to upper case
	    book1.changeToUpperCase();
	            
	    System.out.println(book1.getTitle());
	    System.out.println(book2.getTitle());
	   }
	}